<template>
    <div class="father">
        <h1>Father2...测试子传值到父</h1>
        <h2>接收到Son2子组件传过来的值是：{{count}}</h2>
        <Son2 @countChange="getCount"></Son2>
    </div>
</template>

<script>
    import Son2 from "@/components/Son2";
    export default {
        name: "Father2",
        components:{
            Son2
        },
        data(){
            return{
                count:''
            }
        },
        methods:{
            getCount(value){
                this.count = value;
            }
        }
    }
</script>

<style scoped>

</style>